{% extends "sentry/emails/activity/generic.html" %}

{% load sentry_avatars %}
{% load sentry_helpers %}

{% block action %}
{% endblock %}

{% block activity %}
    <h2 style="margin-bottom: 10px">
        Release {{ version_parsed }} has been deployed to {{ environment }} for an hour
    </h2>
    <p class="muted"><small><strong style="color: #72697d;">{{ deploy.date_finished }}</strong> <span class="divider">&nbsp;</span>  {{ commit_count }} commit{{ commit_count|pluralize }}, {{ author_count }} author{{ author_count|pluralize }}, and {{ file_count }} file{{ file_count|pluralize }} changed across {{ project_count }} project{{ project_count|pluralize }}</small></p>

    <hr>

    <h6>New Issues From This Release</h6>
    <div class="table-border">
      <table class="table projects">
        <tbody>
          {% for project, release_link, issues_link, new_issue_count in projects %}
            <tr>
              <td>
                <h5 style="margin-bottom: 0">
                  <a href="{{ release_link }}">{{ project.slug }}</a>
                </h5>
              </td>
              <td style="text-align: right">
                <a href="{{ issues_link }}" class="btn btn-sm btn-primary">View {{ new_issue_count }} new issue{{ new_issue_count|pluralize }}</a>
              </td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>

{% endblock %}
